# A valid snippet should starts with:
#
#		snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
#		endsnippet
#
# Snippet options:
#
#		b - Beginning of line.
#		i - In-word expansion.
#		w - Word boundary.
#		r - Regular expression
#		e - Custom context snippet
#		A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
#		snippet emitter "emitter properties" b
#		private readonly ${1} = new Emitter<$2>()
#		public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
#		endsnippet
#
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt

# main function.
snippet "(int\ )?main(\(\))?" "main() function" bwr
int main (int ${1:argc}, char** ${2:aegv})
{
	${3://Do something here.}
}$0
endsnippet

snippet "(std::)?cout" "std::cout" rw
std::cout << ${2:"${1:/* Something here */}"}${3: << std::endl};$0
endsnippet

snippet enum "enum" bw
enum ${1:class }${2:name} : ${3:int}
{
	${4://Enumerations here.}
};$0
endsnippet

snippet switch "switch" bw
switch (${1:varname})
{
	case ${2:constexpr}: $3
	${4:default: ${5:break;}}
}$0
endsnippet

snippet while "while loop" bw
while(${1:true})
{
	${2:${VISUAL://\/\/Do Something here.//}}
}$0
endsnippet

snippet class "class" bw
class ${1:name}
{
private:
	${2://Private members here.}
public:
	$1();
	~$1();
};$0
endsnippet

snippet tclass "template class" bw
template <class> class ${1:name}
{
private:
	${2://Private members here.}
public:
	$1();
	~$1();
};$0
endsnippet


#Adjustments
# snippet "    (public|protected|private):" rbA
# `!p
# snip.rv = match.group(1)
# `:$0
# endsnippet
